package com.example.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Daily {

    private Integer id;
    @TableField(value = "date",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime date; //存储日报的日期
    private String dayOfWeek; //星期几
    private String title; //日报标题
    private String summary; //日报摘要
    private String readCount; //阅读人数
    @TableField(value = "create_at",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createAt; //创建时间
    @TableField(value = "update_at",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateAt; //更新时间

    private String content; //日报内容
    private String dailyName; //日报名称

    @TableField(exist = false)
    private String employeeId; // 发布者id
    @TableField(exist = false)
    private String departmentId; // 发布者部门id
}
